<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<link rel="stylesheet" type="text/css" href="<?php echo $this->_webroot('skin/css/admin.css'); ?>">
<link rel="stylesheet" type="text/css" href="<?php echo $this->_webroot('skin/css/main.css'); ?>">

<style>
td span {color:red;}
.green {color:green;}
.red {color:red;}
</style>
</head>
<body>
<input type="hidden" id="update_right" value="1" ></input>
<div id="maincontent">
<psp:tags     htmlname='messagebox'  iconname='messagebox' />
	<div class="wrap">
    <div class="crumbs">当前位置 &gt;&gt; 用户管理 &gt;&gt; 会员等级添加</div>
        <hr />
	<div class="infobox">
    <h3><span class="left">会员级别添加</span> <span style="margin-right:15px;" class="right"><a style="float:right;" href="<?php echo $this->_url('admin/userrank/index');?>">会员级别</a></span></h3>
    <div class="content2">
		<form action="<?php echo $this->_url('admin/userrank/add');?>" method="post">
		<table class="form-table">
		  <tbody>
			<tr>
				<td style="width:85px;">会员级别名称：</td>
				<td><input class="small-text" type="text" name="data[rank_name]" value=""></td>
			</tr>
			<tr>
				<td style="width:85px;">购买金额：</td>
				<td><input class="small-text" type="text" name="data[money]" value="">元</td>
			</tr>			
			<tr>
				<td>权限设置：</td>
				<td>
				<?php foreach($privilege_list as $key=>$value) { ?>
					<?php if($SYSINFO['sys_domain']){?>
						<input type="checkbox" name="privilege[<?php echo $key; ?>]" value="1"><?php echo $value['privilege_name']; ?>
							<?php if($value['privilege_type']){ ?>
								条数：<input class="small-text" type="text" name="privilege_name[<?php echo $key; ?>]" value="" onkeyup="this.value=this.value.replace(/[^\d]/g,'')" onafterpaste="this.value=this.value.replace(/[^\d]/g,'')" maxlength="10"/>
							<?php } ?>
						<br />
					<?php }else {?>
						<?php if($value['privilege_id'] != '9') {?>
							<input type="checkbox" name="privilege[<?php echo $key; ?>]" value="1"><?php echo $value['privilege_name']; ?>
							<?php if($value['privilege_type']){ ?>
								条数：<input class="small-text" type="text" name="privilege_name[<?php echo $key; ?>]" value="" onkeyup="this.value=this.value.replace(/[^\d]/g,'')" onafterpaste="this.value=this.value.replace(/[^\d]/g,'')" maxlength="10" />
							<?php } ?>
						<br />
						<?php }?>
					<?php }?>
				<?php } ?>
				</td>
			</tr>
			<tr>
				<td colspan="2">
					<span class="button-container"><input class="regular-button" type="submit" name="submit" value="添加会员等级" /></span>
				</td>
			</tr>
		  </tbody>
		</table>
		</form>
		
		
	  </div>
	 </div>
	</div>
</div>

</body>
</html>